﻿using Basic.HrGatewayModular.Interface;
using Basic.HrRemoteModel.DeptChange.Model;
using WeDonekRpc.Client;
using WeDonekRpc.Helper.Validate;
using WeDonekRpc.HttpApiGateway;
using WeDonekRpc.HttpApiGateway.Model;
namespace Basic.HrGatewayModular.Api
{
    public class DeptChangeApi : ApiController
    {
        private readonly IDeptChangeService _Service;

        public DeptChangeApi ( IDeptChangeService service )
        {
            this._Service = service;
        }
        /// <summary>
        /// 获取变动的部门列表
        /// </summary>
        /// <param name="deptId"></param>
        /// <returns></returns>
        public ChangeDeptTree GetDept ( [NumValidate("hr.dept.id.error", 1)] long deptId, bool? isUnit )
        {
            return this._Service.GetDept(deptId, isUnit);
        }
        /// <summary>
        /// 获取解散部门影响的人员
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public PagingResult<DisbandDeptEmp> QueryEmp ( PagingParam<DeptDisbandedArg> obj )
        {
            return this._Service.Query(obj);
        }
    }
}
